﻿using System;
using System.Collections.Generic;
using System.Text;

namespace BGN.PlugIn.Client
{
    public class CommonConfiger : Common.BasicConfiger
    {
        protected override String ParentXPath
        {
            get
            {
                return "/Configs/Common";
            }
        }

        /// <summary>
        /// ActiveX发送消息到布谷鸟的端口号
        /// </summary>
        /// <returns></returns>
        public String GetActiveXToBGNRemotingPort()
        {
            return GetXmlConfigNodeInnerText("/RemotingPort1");
        }

        /// <summary>
        /// 获取布谷鸟发送消息到ActiveX的端口号
        /// </summary>
        /// <returns></returns>
        public String GetBGNToActiveXRemotingPort()
        {
            return GetXmlConfigNodeInnerText("/RemotingPort2");
        }

        private static CommonConfiger instance;
        private static Object locker = new Object();

        public static CommonConfiger Instance
        {
            get
            {
                if (instance != null) return instance;
                lock (locker)
                {
                    instance = new CommonConfiger();
                }
                return instance;
            }
        }
    }
}
